In the context of event and content-based subscription systems, events are defined which, when met, trigger an action. For example, a subscriber can define rules that include events that define a state of content that, when met, trigger transmission of content to the subscriber. Using a database management system as an underlying engine for an event-based subscription system, a subscriber can register queries with the system that represent conditional expressions on the content of the events. In such a subscription or similarly functioning system, a potentially very large set of queries, i.e., an expression set on the content, are registered to manage the publication of desired content data. When a given data item becomes available, these conditional expressions are filtered to find those expressions that match the given data item.
A simple but inefficient approach to the task of filtering expression sets is to test all of the expressions in a given set for each data item. However, this approach is scalable neither for a large set of expressions nor for a high rate of events. Therefore, most commercial systems pre-process the expression set and create in-memory matching networks (i.e., specialized data structures) that group matching predicates in the expression set and share the processing cost across multiple expressions.
Matching networks are decision trees in which each node represents a predicate group in a given expression set. Data flows from a parent node to its children only if the data evaluates to true for the predicate representing the parent node. A path from the root of the decision tree to a leaf node represents all the conjunctions in an expression. The leaf nodes in the tree are labeled with expression identifiers and if a data item passes the predicate test on a leaf node, the corresponding expressions are considered true for that data item. Many variants of the matching networks (like RETE, TREAT and Gator networks) are in use for the existing systems.
In existing systems, any operation requiring filtering of expressions and related information requires significant custom coding and reduces performance characteristics. Furthermore, the number of expressions is limited in size as the corresponding matching networks must fit in main-memory, changes in expressions are costly, and users are unable to adjust filtering strategies to the structure and use of the expressions and related data.
Based on the foregoing, it is clearly desirable to provide an improved mechanism for managing expressions, such as expressions associated with a subscription system. In addition, there is a more specific need for a mechanism that provides the ability to filter expressions in conjunction with filters on other related information.